import { Navigate } from 'react-router-dom'
import Login from '../pages/Login/Login'
import MainPage from '../pages/MainPage/MainPage'
import AddingPage from '../pages/AddingPage/AddingPage';
import ListPage from '../pages/ListPage/ListPage';
import ListPageMobile from '../pages/ListPage/ListPageMobile';
import SettingPage from '../pages/SettingPage/SettingPage';
import FilterPage from '../pages/Filter/FilterPage';
import DashBoard from '../pages/DashBoard/DashBoard';
import DouyinPage from '../pages/Douyin/DouyinPage';
import AnchorPage from '../pages/Anchor/AnchorPage';
import ServicerPage from '../pages/Servicer/ServicerPage';
import DoudianPage from '../pages/Doudian/DoudianPage';
import RobotPage from '../pages/Robot/RobotPage';

let routerTab = [
    {
        path: '/login',
        element: <Login />
    },
    {
        index: true,
        element: <Navigate to="/login" />
    },//路由重定向到登录界面
    {
        path: "/index",
        element: <MainPage />,
        children: [
            {
                path: "/index/adding",
                element: <AddingPage />
            },
            {
                path: "/index/dashboard",
                element: <DashBoard />
            },
            {
                path: "/index/servicer",
                element: <ServicerPage />
            },
            {
                path: "/index/robot",
                element: <RobotPage />
            },
            {
                path: "/index/doudian",
                element: <DoudianPage />
            },
            {
                path: "/index/anchor",
                element: <AnchorPage />
            },
            {
                path: "/index/listDesktop",
                element: <ListPage />
            },
            {
                path: "/index/listMobile",
                element: <ListPageMobile />
            },
            {
                path: "/index/filter",
                element: <FilterPage />
            },
            {
                path: "/index/setting",
                element: <SettingPage />
            },
            {
                path: "/index/douyin",
                element: <DouyinPage />
            },
            {
                index: true,
                element: <Navigate to="/index/dashboard" />
            },
        ]
    }
]


export default routerTab;